home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
DATABASE.DIR
/
00105_Script_TIMELINE BUTTON
< prev
next >
Wrap
Text File
|
1996-03-28
|
2KB
|
67 lines
-- --------------------------------------------------------------
-- Handler clickTimeLineButton is called when the user clicks the
-- timeLine button
on clickTimeLineButton
global timeLineButton
activateButtonThenEnable(timeLineButton)
doTimeLine
end
-- --------------------------------------------------------------
-- Handler doTimeLine jumps to the proper screen in the timeline.
on doTimeLine
global clickedTopic, dataTimeLineMapping
set theLine = getTimeLineScene(clickedTopic)
-- ERROR HANDLING
if (theLine = 0) then
exit
else
set the itemDelimiter = ":"
set theScene = item 2 of line theLine of dataTimeLineMapping
set the itemDelimiter = ","
goScene(theScene)
initializeTimeline
end if
end
-- --------------------------------------------------------------
-- Handler getTimeLineScene returns the frame in the timeline to
-- jump to.
on getTimeLineScene whichTopic
global dataTimeLineMapping
return binSearchFirstItemInLine(dataTimeLineMapping, whichTopic, ":")
end
-- --------------------------------------------------------------
-- Handler setDataTimeLineMapping sets up the data in field
-- dataTimeLineMapping which contains a list of all topics from
-- which the user can jump to the timeline and the associated
-- marker in the timeline.
on setDataTimeLineMapping
set theMapping = EMPTY
set the itemDelimiter = ":"
repeat with i = 1 to the number of lines in field "Button States"
set theTopic = item 1 of line i of field "Button States"
set timelineState = value(word 2 of item 2 of line i of field "Button States")
if timelineState then
put theTopic & ":" & RETURN after theMapping
end if
end repeat
set the itemDelimiter = ","
put theMapping into field "DataTimeLineMapping"
end